package com.novel.download.controller.resp;

import lombok.Data;

import java.util.List;

@Data
public class CatalogueResp implements H5Interface {

    private String bookName;
    private String netWorkName;
    private List<Catalogue> catalogueList;

    @Override
    public String toString() {
        StringBuilder s = new StringBuilder(bookName + "\n");
        for (Catalogue catalogue : catalogueList) {
            s.append(catalogue.toString()).append("<br>");
        }
        return s.toString();
    }


    @Override
    public String toH5String() {
        StringBuilder s = new StringBuilder(netWorkName + "-" + bookName + "<br><br>");
        for (Catalogue catalogue : catalogueList) {
            s.append(catalogue.toH5String()).append("<br>");
        }
        return s.toString();
    }
}
